<%@ Page Title="Vendor" Language="C#" MasterPageFile="~/Admin/Membership.master"
    AutoEventWireup="true" CodeFile="Vendor.aspx.cs" Inherits="Admin_Default" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <br />
    <br />   <br />
    <br />
     <br />
    <telerik:RadGrid runat="server" ID="RadGrid1" AllowPaging="False" AutoGenerateColumns="False"
        Width="97%" AllowAutomaticInserts="true" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true"
        ShowStatusBar="True" GridLines="None" OnItemDataBound="RadGrid1_ItemDataBound"
        OnItemCreated="RadGrid1_ItemCreated" PageSize="10" OnNeedDataSource="RadGrid1_NeedDataSource"
        OnDeleteCommand="RadGrid1_DeleteCommand" OnUpdateCommand="RadGrid1_UpdateCommand"
        OnInsertCommand="RadGrid1_InsertCommand" OnEditCommand="RadGrid1_EditCommand"
        Skin="WebBlue">
        <PagerStyle Mode="NumericPages" AlwaysVisible="true" />
        <MasterTableView Width="100%" CommandItemDisplay="Top" ClientDataKeyNames="VendorID,VendorName,Address1,Address2,City,State,ZipCode">
            <Columns>
                <telerik:GridEditCommandColumn ButtonType="ImageButton">
                    <HeaderStyle Width="3%" />
                </telerik:GridEditCommandColumn>
                <telerik:GridTemplateColumn HeaderText="" UniqueName="" SortExpression="">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblName1" Text="" />
                    </ItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1"
                            SelectedIndex="0">
                            <Tabs>
                                <telerik:RadTab Text="Vendor">
                                </telerik:RadTab>
                                <telerik:RadTab Text="Vender Contact1">
                                </telerik:RadTab>
                                <telerik:RadTab Text="Vender Contact2">
                                </telerik:RadTab>
                            </Tabs>
                        </telerik:RadTabStrip>
                        <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" CssClass="multiPage">
                            <telerik:RadPageView ID="RadPageView1" runat="server">
                                <table cellspacing="0">
                                    <tr>
                                        <td>
                                            Industry
                                        </td>
                                        <td>
                                            <telerik:RadComboBox ID="dropIndustry" runat="server" EmptyMessage="Choose a Category"
                                                EnableLoadOnDemand="true">
                                            </telerik:RadComboBox>
                                        </td>
                                        <td>
                                            <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="Select Industry"
                                                ControlToValidate="dropIndustry" InitialValue="0">*</asp:RequiredFieldValidator>--%>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Name
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtName" runat="server" Text='<%# Bind("VendorName") %>'></asp:TextBox>
                                        </td>
                                        <td>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Enter Name"
                                                ControlToValidate="txtName">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Address1
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtAddress1" runat="server" Text='<%# Bind("Address1") %>'></asp:TextBox>
                                        </td>
                                        <td>
                                            <%--  <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Enter Address1"
                                                ControlToValidate="txtAddress1">*</asp:RequiredFieldValidator>--%>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Address2
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtAddress2" runat="server" Text='<%# Bind("Address2") %>'></asp:TextBox>
                                        </td>
                                        <td>
                                            &nbsp;
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            City
                                        </td>
                                        <td>
                                            <%--  <telerik:RadComboBox ID="dropCity" runat="server" Width="150px" CausesValidation="false"  AutoPostBack="true" 
                                              OnSelectedIndexChanged="dropCity_SelectedIndexChanged"/>--%>
                                            <asp:TextBox ID="txtCity" runat="server" Text='<%# Bind("City") %>'></asp:TextBox>
                                        </td>
                                        <td>
                                            <%--  <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator11" ControlToValidate="dropCity"
                                                ErrorMessage="*"></asp:RequiredFieldValidator>--%>
                                            <%-- <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="Select City"
                                                InitialValue="0" ControlToValidate="dropCity">*</asp:RequiredFieldValidator>--%>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            State
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtState" runat="server" Text='<%# Bind("State") %>'></asp:TextBox>
                                        </td>
                                        <td>
                                            <%--   <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="Enter State"
                                                ControlToValidate="txtState">*</asp:RequiredFieldValidator>--%>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            ZipCode
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtZipCode" runat="server" Text='<%# Bind("ZipCode") %>'></asp:TextBox>
                                        </td>
                                        <td>
                                            <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="Enter ZipCode"
                                                ControlToValidate="txtZipCode">*</asp:RequiredFieldValidator>--%>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            PhoneNumber
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtPhnoeNo" runat="server"></asp:TextBox>
                                        </td>
                                        <td>
                                            <%--  <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ErrorMessage="Enter Phone Number"
                                                ControlToValidate="txtPhnoeNo">*</asp:RequiredFieldValidator>--%>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Fax
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtFax" runat="server" Text='<%# Bind("Fax") %>'></asp:TextBox>
                                        </td>
                                        <td>
                                            <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ErrorMessage="Enter Fax No"
                                                ControlToValidate="txtFax">*</asp:RequiredFieldValidator>--%>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Website
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtWebSite" runat="server" Text='<%# Bind("Website") %>'></asp:TextBox>
                                        </td>
                                        <td>
                                            <%--   <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ErrorMessage="Enter Website"
                                                ControlToValidate="txtWebSite">*</asp:RequiredFieldValidator>--%>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Email
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtEmail" runat="server" Text='<%# Bind("Email") %>'></asp:TextBox>
                                        </td>
                                        <td>
                                            <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ErrorMessage="Enter Email"
                                                ControlToValidate="txtEmail">*</asp:RequiredFieldValidator>--%>
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtEmail"
                                                ErrorMessage="You must enter an valid email address" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*
                                            </asp:RegularExpressionValidator>
                                        </td>
                                    </tr>
                                    <%--       <tr>
                                        <td>
                                            Status
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="chkStatus" runat="server" />
                                        </td>
                                        <td>
                                            &nbsp;
                                        </td>
                                    </tr>--%>
                                    <tr>
                                        <td colspan="3">
                                            <asp:Label ID="lblmessage" runat="server" Text="" Font-Bold="true" ForeColor="Red"></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </telerik:RadPageView>
                            <telerik:RadPageView ID="RadPageView2" runat="server">
                                <table cellspacing="0">
                                    <tr>
                                        <td>
                                            Contact First Name
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtContactFName1" runat="server"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Contact Last Name
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtContactLName1" runat="server"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            ContactMInitial
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtContactMInitial1" runat="server"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Contact Email
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtContactEmail1" runat="server"></asp:TextBox>
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtContactEmail1"
                                                ErrorMessage="You must enter an valid email address" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*
                                            </asp:RegularExpressionValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Contact Phone Number
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtContactPhoneNum1" runat="server"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Fax
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtContactFax1" runat="server"></asp:TextBox>
                                        </td>
                                    </tr>
                                </table>
                            </telerik:RadPageView>
                            <telerik:RadPageView ID="RadPageView3" runat="server">
                                <table cellspacing="0">
                                    <tr>
                                        <td>
                                            Contact First Name
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtContactFName2" runat="server"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Contact Last Name
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtContactLName2" runat="server"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            ContactMInitial
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtContactMInitial2" runat="server"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Contact Email
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtContactEmail2" runat="server"></asp:TextBox>
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtContactEmail2"
                                                ErrorMessage="You must enter an valid email address" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*
                                            </asp:RegularExpressionValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Contact Phone Number
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtContactPhoneNum2" runat="server"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Fax
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtContactFax2" runat="server"></asp:TextBox>
                                        </td>
                                    </tr>
                                </table>
                            </telerik:RadPageView>
                        </telerik:RadMultiPage>
                    </EditItemTemplate>
                    <HeaderStyle Width="2%" />
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="VendorName" UniqueName="Name" DataField="VendorName"
                    SortExpression="Name">
                    <ItemTemplate>
                        <asp:Label ID="lblVendorName" runat="server" Text='<%# (Eval("VendorName") as string) %>' />
                    </ItemTemplate>
                    <ItemStyle VerticalAlign="Top" />
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="Address" UniqueName="Address" DataField="Address">
                    <ItemTemplate>
                        <asp:Label ID="lblAddress1" runat="server" Text="Label"></asp:Label>
                        <br />
                        <asp:Label ID="lblAddress2" runat="server" Text="Label"></asp:Label>
                        <br />
                        <asp:Label ID="lblCity" runat="server" Text="Label"></asp:Label>
                        <br />
                    </ItemTemplate>
                    <ItemStyle VerticalAlign="Top" />
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="City" UniqueName="City" DataField="City"
                    SortExpression="Name">
                    <ItemTemplate>
                        <asp:Label ID="City" runat="server" Text='<%# (Eval("City") as string) %>' />
                    </ItemTemplate>
                    <ItemStyle VerticalAlign="Top" />
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="State" UniqueName="State" DataField="State"
                    SortExpression="Name">
                    <ItemTemplate>
                        <asp:Label ID="lblState" runat="server" Text='<%# (Eval("State") as string) %>' />
                    </ItemTemplate>
                    <ItemStyle VerticalAlign="Top" />
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="Email" UniqueName="Email" DataField="Email"
                    SortExpression="Name">
                    <ItemTemplate>
                        <asp:Label ID="lblEmail" runat="server" Text='<%# (Eval("Email") as string) %>' />
                    </ItemTemplate>
                    <ItemStyle VerticalAlign="Top" />
                </telerik:GridTemplateColumn>
                <telerik:GridButtonColumn ConfirmText="Delete this Vendor?" ConfirmDialogType="RadWindow"
                    ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" />
            </Columns>
            <EditFormSettings>
                <EditColumn ButtonType="ImageButton" />
            </EditFormSettings>
            <PagerStyle Mode="NumericPages"></PagerStyle>
        </MasterTableView>
    </telerik:RadGrid>
</asp:Content>
